home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 November / macformat-043.iso / mac / Shareware Plus / Developers / OpenStack Rinaldi Collection / openstack-rinaldi-lib / Align 2.7 (US) / Align 2.7 (US).rsrc / HELP_5635 next >
Encoding:
Text File  |  1996-01-08  |  4.6 KB  |  93 lines

  1.  
  2.  
  3.                                                   Align 2.7
  4.  
  5.                                           by Frédéric RINALDI
  6.  
  7.                           from an original idea of Jean-Luc PASTRE
  8.  
  9.  
  10. DESCRIPTION
  11.   Align is a XFCN allowing to align in columns the content of a field.
  12.  
  13. SYNTAX
  14.       Align(<text>[,<F1>[…,<Fn>]][,"s=<sep char>"][,"f=<filler char>"])
  15.  
  16.     F = "<col. width>[,<L[eft]|R[ight]|C[enter]|D[ecimal]>[,<separator>]]"
  17.  
  18. PARAMETERS
  19.   <text> can be any valid HyperTalk container, or a litteral string.
  20.  
  21.   [,<F1>[…,<Fn>]] define formats, each format applying to the corresponding column. Up to 14 formats can be defined, the last one being used for all succeeding columns.
  22.   A format is a three items string : an integer for the column width (>0 and 
  23. <256), a char (L, R, C or D) for the alignment of the text in the column and a separation string of any length which will be inserted after the column.
  24.   If the char "*" is used for the column width, it will be calculated accor-ding to the longest item found in it.
  25.    If no format is passed as param, "*,L, " will be used as default.
  26.  
  27.    "s=<sep char>"  is an optionnal single character, and allows to use any other char in place of comma to delimit the columns. Defaut is comma (or current itemDelimiter value with HC2.1).
  28.  
  29.    "f=<filler char>" is an optionnal single character, and allows to define the filler character (space by default).
  30.  
  31.    Using "!", "?" or "=" as first parameter will return an online help (resp. copyright, syntax and output).
  32.  
  33. USING
  34.   The XFCN return the columnized text. If a chunk is longer than its column width, its last (or first, with right alignment) char will be "…".
  35.   Each column's width cannot exceed 255 chars.
  36.   Finally, use a non-proportional font (Courier, Monaco, etc.) for the field to get a correct presentation.
  37.  
  38. ERRORS
  39.   If an error occurs, the fonction will return :
  40.      "Error : Out of memory"
  41.      "Error : Missing parameter"
  42.      "Error : Param must be "s=…" or "f=…""
  43.      "Error : Missing char following "X=""
  44.      "Error : First item of Format X must be an integer > 0"
  45.      "Error : First item of Format X must be an integer ≤ 255"
  46.      "Error : Second item of Format X must be [l,r,c,d]"
  47.  
  48. HISTORY
  49. 2.7                                                                                         06/18/92
  50. • Added HC 2.1 itemDelimiter support
  51.                                                                                          
  52. 2.6                                                                                         06/09/92
  53. • Fixed bug when no format param is passed
  54. • Fixed bug with decimal format and non-decimal data
  55.                                                                                          
  56. 2.5                                                                                         03/17/92
  57. • Fixed decimal alignment
  58. • Trailing returns removed from input List
  59.                                                                                          
  60. 2.4                                                                                         03/15/92
  61. • Fixed that rare, random & nasty bug
  62. • Unlimited columns number
  63. • Added decimal alignment
  64. • Changed delim & filler params format
  65. • Only first param is now needed
  66. • Each line is extended to the last column.
  67.                                                                                          
  68. 2.2
  69. • Max columns extended to 100 with range checking
  70.                                                                                          
  71. 2.1
  72. • Last column delimiter removed.
  73.                                                                                          
  74. 2.0
  75. • Fixed a small bug arising with certain delimiter chars.
  76. • Added the automatic column width calculation.
  77.                                                                                          
  78. 1.1
  79. • third items of a format string can now be empty
  80. • no more separator string returned after last column
  81. • all separator strings are shown, even for empty lines
  82. • filler char choice added
  83. • all separator strings shown, whatever is number of items of line
  84. • trailing spaces removed at the end of the lines
  85. --------------------------------------------------------------------
  86.    All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :
  87.  
  88.                    Align XFCN, © Frederic Rinaldi, 1989…1993.
  89.  
  90.    Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses:
  91.  
  92. AppleLink: RINALDI1   CalvaCom : FR10    Compuserve : 71170,2111
  93.                Internet : RINALDI1@APPLELINK@APPLE.COM